﻿/**
 * Tetrino, a .NET wrapper and plug-in for Rhinoceros 3d and Grasshopper
 * for Tetgen (http://tetgen.org).
 *
 * Copyright (C) 2017 Tom Svilans (http://tomsvilans.com)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Test
{
    class Program
    {
        static void Main(string[] args)
        {
            TetgenSharp.TetgenMesh tm = new TetgenSharp.TetgenMesh();
            tm.Vertices = new double[]
                {
                -26.90743, 1.62066, -1608.393,
                264.9799, -113.5351, -1577.488,
                545.6501, -224.2655, -1485.961,
                804.3173, -326.3152, -1337.33,
                1031.041, -415.7626, -1137.305,
                1217.108, -489.1701, -893.5751,
                1355.369, -543.7169, -615.5052,
                1440.509, -577.3065, -313.7819,
                1469.258, -588.6484, 0,
                1440.509, -577.3065, 313.7819,
                1355.369, -543.7169, 615.5052,
                1217.108, -489.1701, 893.5751,
                1031.041, -415.7626, 1137.305,
                804.3173, -326.3152, 1337.33,
                545.6501, -224.2655, 1485.961,
                264.9799, -113.5351, 1577.488,
                -26.90743, 1.62066, -1608.393,
                281.8371, -54.37804, -1577.488,
                578.7168, -108.2247, -1485.961,
                852.3227, -157.8502, -1337.33,
                1092.14, -201.3472, -1137.305,
                1288.953, -237.0443, -893.5751,
                1435.199, -263.5696, -615.5052,
                1525.256, -279.9038, -313.7819,
                1555.665, -285.4192, 0,
                1525.256, -279.9038, 313.7819,
                1435.199, -263.5696, 615.5052,
                1288.953, -237.0443, 893.5751,
                1092.14, -201.3472, 1137.305,
                852.3227, -157.8502, 1337.33,
                578.7168, -108.2247, 1485.961,
                281.8371, -54.37804, 1577.488,
                -26.90743, 1.62066, 1608.393,
                -26.90743, 1.62066, -1608.393,
                286.8295, 6.931032, -1577.488,
                588.5097, 12.03733, -1485.961,
                866.5397, 16.74332, -1337.33,
                1110.235, 20.86815, -1137.305,
                1310.231, 24.25332, -893.5751,
                1458.841, 26.76872, -615.5052,
                1550.355, 28.3177, -313.7819,
                1581.255, 28.84073, 0,
                1550.355, 28.3177, 313.7819,
                1458.841, 26.76872, 615.5052,
                1310.231, 24.25332, 893.5751,
                1110.235, 20.86815, 1137.305,
                866.5397, 16.74332, 1337.33,
                588.5097, 12.03733, 1485.961,
                286.8295, 6.931032, 1577.488,
                -26.90743, 1.62066, 1608.393,
                -26.90743, 1.62066, -1608.393,
                279.7651, 68.03603, -1577.488,
                574.6524, 131.8991, -1485.961,
                846.4221, 190.7556, -1337.33,
                1084.63, 242.3438, -1137.305,
                1280.123, 284.6812, -893.5751,
                1425.386, 316.1406, -615.5052,
                1514.84, 335.5133, -313.7819,
                1545.044, 342.0546, 0,
                1514.84, 335.5133, 313.7819,
                1425.386, 316.1406, 615.5052,
                1280.123, 284.6812, 893.5751,
                1084.63, 242.3438, 1137.305,
                846.4221, 190.7556, 1337.33,
                574.6524, 131.8991, 1485.961,
                279.7651, 68.03603, 1577.488,
                -26.90743, 1.62066, 1608.393,
                -26.90743, 1.62066, -1608.393,
                260.9155, 126.5887, -1577.488,
                537.6776, 246.7543, -1485.961,
                792.7429, 357.4996, -1337.33,
                1016.31, 454.5686, -1137.305,
                1199.786, 534.2311, -893.5751,
                1336.121, 593.4257, -615.5052,
                1420.076, 629.8776, -313.7819,
                1448.424, 642.1859, 0,
                1420.076, 629.8776, 313.7819,
                1336.121, 593.4257, 615.5052,
                1199.786, 534.2311, 893.5751,
                1016.31, 454.5686, 1137.305,
                792.7429, 357.4996, 1337.33,
                537.6776, 246.7543, 1485.961,
                260.9155, 126.5887, 1577.488,
                -26.90743, 1.62066, 1608.393,
                -26.90743, 1.62066, -1608.393,
                231.005, 180.339, -1577.488,
                479.006, 352.1892, -1485.961,
                707.5651, 510.5674, -1337.33,
                907.8987, 649.3869, -1137.305,
                1072.308, 763.3132, -893.5751,
                1194.476, 847.9681, -615.5052,
                1269.706, 900.0983, -313.7819,
                1295.108, 917.7005, 0,
                1269.706, 900.0983, 313.7819,
                1194.476, 847.9681, 615.5052,
                1072.308, 763.3132, 893.5751,
                907.8987, 649.3869, 1137.305,
                707.5651, 510.5674, 1337.33,
                479.006, 352.1892, 1485.961,
                231.005, 180.339, 1577.488,
                -26.90743, 1.62066, 1608.393,
                -26.90743, 1.62066, -1608.393,
                191.1831, 227.2212, -1577.488,
                400.8925, 444.152, -1485.961,
                594.1618, 644.0765, -1337.33,
                763.5637, 819.3119, -1137.305,
                902.5883, 963.1238, -893.5751,
                1005.893, 1069.986, -615.5052,
                1069.508, 1135.791, -313.7819,
                1090.988, 1158.011, 0,
                1069.508, 1135.791, 313.7819,
                1005.893, 1069.986, 615.5052,
                902.5883, 963.1238, 893.5751,
                763.5637, 819.3119, 1137.305,
                594.1618, 644.0765, 1337.33,
                400.8925, 444.152, 1485.961,
                191.1831, 227.2212, 1577.488,
                -26.90743, 1.62066, 1608.393,
                -26.90743, 1.62066, -1608.393,
                142.9801, 265.4337, -1577.488,
                306.3389, 519.1085, -1485.961,
                456.8912, 752.8965, -1337.33,
                588.8514, 957.8135, -1137.305,
                697.1484, 1125.984, -893.5751,
                777.6202, 1250.947, -615.5052,
                827.1746, 1327.898, -313.7819,
                843.9071, 1353.881, 0,
                827.1746, 1327.898, 313.7819,
                777.6202, 1250.947, 615.5052,
                697.1484, 1125.984, 893.5751,
                588.8514, 957.8135, 1137.305,
                456.8912, 752.8965, 1337.33,
                306.3389, 519.1085, 1485.961,
                142.9801, 265.4337, 1577.488,
                -26.90743, 1.62066, 1608.393,
                -26.90743, 1.62066, -1608.393,
                88.24834, 293.508, -1577.488,
                198.9788, 574.1782, -1485.961,
                301.0285, 832.8454, -1337.33,
                390.4758, 1059.569, -1137.305,
                463.8833, 1245.636, -893.5751,
                518.4301, 1383.897, -615.5052,
                552.0198, 1469.037, -313.7819,
                563.3616, 1497.786, 0,
                552.0198, 1469.037, 313.7819,
                518.4301, 1383.897, 615.5052,
                463.8833, 1245.636, 893.5751,
                390.4758, 1059.569, 1137.305,
                301.0285, 832.8454, 1337.33,
                198.9788, 574.1782, 1485.961,
                88.24834, 293.508, 1577.488,
                -26.90743, 1.62066, 1608.393,
                -26.90743, 1.62066, -1608.393,
                29.09127, 310.3652, -1577.488,
                82.93797, 607.2449, -1485.961,
                132.5634, 880.8508, -1337.33,
                176.0604, 1120.668, -1137.305,
                211.7575, 1317.482, -893.5751,
                238.2828, 1463.727, -615.5052,
                254.6171, 1553.784, -313.7819,
                260.1324, 1584.193, 0,
                254.6171, 1553.784, 313.7819,
                238.2828, 1463.727, 615.5052,
                211.7575, 1317.482, 893.5751,
                176.0604, 1120.668, 1137.305,
                132.5634, 880.8508, 1337.33,
                82.93797, 607.2449, 1485.961,
                29.09127, 310.3652, 1577.488,
                -26.90743, 1.62066, 1608.393,
                -26.90743, 1.62066, -1608.393,
                -32.2178, 315.3576, -1577.488,
                -37.3241, 617.0378, -1485.961,
                -42.03009, 895.0678, -1337.33,
                -46.15493, 1138.763, -1137.305,
                -49.54009, 1338.759, -893.5751,
                -52.0555, 1487.369, -615.5052,
                -53.60447, 1578.883, -313.7819,
                -54.1275, 1609.783, 0,
                -53.60447, 1578.883, 313.7819,
                -52.0555, 1487.369, 615.5052,
                -49.54009, 1338.759, 893.5751,
                -46.15493, 1138.763, 1137.305,
                -42.03009, 895.0678, 1337.33,
                -37.3241, 617.0378, 1485.961,
                -32.2178, 315.3576, 1577.488,
                -26.90743, 1.62066, 1608.393,
                -26.90743, 1.62066, -1608.393,
                -93.32281, 308.2932, -1577.488,
                -157.1859, 603.1805, -1485.961,
                -216.0424, 874.9502, -1337.33,
                -267.6306, 1113.158, -1137.305,
                -309.9679, 1308.651, -893.5751,
                -341.4274, 1453.915, -615.5052,
                -360.8, 1543.368, -313.7819,
                -367.3414, 1573.572, 0,
                -360.8, 1543.368, 313.7819,
                -341.4274, 1453.915, 615.5052,
                -309.9679, 1308.651, 893.5751,
                -267.6306, 1113.158, 1137.305,
                -216.0424, 874.9502, 1337.33,
                -157.1859, 603.1805, 1485.961,
                -93.32281, 308.2932, 1577.488,
                -26.90743, 1.62066, 1608.393,
                -26.90743, 1.62066, -1608.393,
                -151.8755, 289.4436, -1577.488,
                -272.0411, 566.2056, -1485.961,
                -382.7864, 821.271, -1337.33,
                -479.8554, 1044.838, -1137.305,
                -559.5179, 1228.314, -893.5751,
                -618.7125, 1364.649, -615.5052,
                -655.1643, 1448.604, -313.7819,
                -667.4726, 1476.952, 0,
                -655.1643, 1448.604, 313.7819,
                -618.7125, 1364.649, 615.5052,
                -559.5179, 1228.314, 893.5751,
                -479.8554, 1044.838, 1137.305,
                -382.7864, 821.271, 1337.33,
                -272.0411, 566.2056, 1485.961,
                -151.8755, 289.4436, 1577.488,
                -26.90743, 1.62066, 1608.393,
                -26.90743, 1.62066, -1608.393,
                -205.6257, 259.5331, -1577.488,
                -377.476, 507.5341, -1485.961,
                -535.8541, 736.0931, -1337.33,
                -674.6737, 936.4268, -1137.305,
                -788.6, 1100.836, -893.5751,
                -873.2548, 1223.004, -615.5052,
                -925.385, 1298.234, -313.7819,
                -942.9872, 1323.636, 0,
                -925.385, 1298.234, 313.7819,
                -873.2548, 1223.004, 615.5052,
                -788.6, 1100.836, 893.5751,
                -674.6737, 936.4268, 1137.305,
                -535.8541, 736.0931, 1337.33,
                -377.476, 507.5341, 1485.961,
                -205.6257, 259.5331, 1577.488,
                -26.90743, 1.62066, 1608.393,
                -26.90743, 1.62066, -1608.393,
                -252.5079, 219.7112, -1577.488,
                -469.4388, 429.4206, -1485.961,
                -669.3633, 622.6899, -1337.33,
                -844.5987, 792.0919, -1137.305,
                -988.4106, 931.1165, -893.5751,
                -1095.273, 1034.421, -615.5052,
                -1161.078, 1098.036, -313.7819,
                -1183.297, 1119.516, 0,
                -1161.078, 1098.036, 313.7819,
                -1095.273, 1034.421, 615.5052,
                -988.4106, 931.1165, 893.5751,
                -844.5987, 792.0919, 1137.305,
                -669.3633, 622.6899, 1337.33,
                -469.4388, 429.4206, 1485.961,
                -252.5079, 219.7112, 1577.488,
                -26.90743, 1.62066, 1608.393,
                -26.90743, 1.62066, -1608.393,
                -290.7204, 171.5081, -1577.488,
                -544.3953, 334.8669, -1485.961,
                -778.1833, 485.4193, -1337.33,
                -983.1002, 617.3795, -1137.305,
                -1151.271, 725.6765, -893.5751,
                -1276.234, 806.1484, -615.5052,
                -1353.185, 855.7027, -313.7819,
                -1379.168, 872.4352, 0,
                -1353.185, 855.7027, 313.7819,
                -1276.234, 806.1484, 615.5052,
                -1151.271, 725.6765, 893.5751,
                -983.1002, 617.3795, 1137.305,
                -778.1833, 485.4193, 1337.33,
                -544.3953, 334.8669, 1485.961,
                -290.7204, 171.5081, 1577.488,
                -26.90743, 1.62066, 1608.393,
                -26.90743, 1.62066, -1608.393,
                -318.7947, 116.7764, -1577.488,
                -599.465, 227.5069, -1485.961,
                -858.1322, 329.5566, -1337.33,
                -1084.856, 419.0039, -1137.305,
                -1270.923, 492.4114, -893.5751,
                -1409.184, 546.9581, -615.5052,
                -1494.324, 580.5479, -313.7819,
                -1523.072, 591.8897, 0,
                -1494.324, 580.5479, 313.7819,
                -1409.184, 546.9581, 615.5052,
                -1270.923, 492.4114, 893.5751,
                -1084.856, 419.0039, 1137.305,
                -858.1322, 329.5566, 1337.33,
                -599.465, 227.5069, 1485.961,
                -318.7947, 116.7764, 1577.488,
                -26.90743, 1.62066, 1608.393,
                -26.90743, 1.62066, -1608.393,
                -335.652, 57.61936, -1577.488,
                -632.5317, 111.4661, -1485.961,
                -906.1376, 161.0915, -1337.33,
                -1145.955, 204.5885, -1137.305,
                -1342.768, 240.2856, -893.5751,
                -1489.014, 266.8109, -615.5052,
                -1579.071, 283.1451, -313.7819,
                -1609.48, 288.6606, 0,
                -1579.071, 283.1451, 313.7819,
                -1489.014, 266.8109, 615.5052,
                -1342.768, 240.2856, 893.5751,
                -1145.955, 204.5885, 1137.305,
                -906.1376, 161.0915, 1337.33,
                -632.5317, 111.4661, 1485.961,
                -335.652, 57.61936, 1577.488,
                -26.90743, 1.62066, 1608.393,
                -26.90743, 1.62066, -1608.393,
                -340.6443, -3.689711, -1577.488,
                -642.3245, -8.796008, -1485.961,
                -920.3546, -13.502, -1337.33,
                -1164.05, -17.62683, -1137.305,
                -1364.046, -21.012, -893.5751,
                -1512.656, -23.5274, -615.5052,
                -1604.169, -25.07638, -313.7819,
                -1635.07, -25.59941, 0,
                -1604.169, -25.07638, 313.7819,
                -1512.656, -23.5274, 615.5052,
                -1364.046, -21.012, 893.5751,
                -1164.05, -17.62683, 1137.305,
                -920.3546, -13.502, 1337.33,
                -642.3245, -8.796008, 1485.961,
                -340.6443, -3.689711, 1577.488,
                -26.90743, 1.62066, 1608.393,
                -26.90743, 1.62066, -1608.393,
                -333.58, -64.79471, -1577.488,
                -628.4673, -128.6578, -1485.961,
                -900.237, -187.5143, -1337.33,
                -1138.445, -239.1025, -1137.305,
                -1333.938, -281.4398, -893.5751,
                -1479.201, -312.8993, -615.5052,
                -1568.654, -332.272, -313.7819,
                -1598.859, -338.8133, 0,
                -1568.654, -332.272, 313.7819,
                -1479.201, -312.8993, 615.5052,
                -1333.938, -281.4398, 893.5751,
                -1138.445, -239.1025, 1137.305,
                -900.237, -187.5143, 1337.33,
                -628.4673, -128.6578, 1485.961,
                -333.58, -64.79471, 1577.488,
                -26.90743, 1.62066, 1608.393,
                -26.90743, 1.62066, -1608.393,
                -314.7304, -123.3474, -1577.488,
                -591.4924, -243.513, -1485.961,
                -846.5578, -354.2583, -1337.33,
                -1070.125, -451.3273, -1137.305,
                -1253.601, -530.9898, -893.5751,
                -1389.936, -590.1844, -615.5052,
                -1473.891, -626.6362, -313.7819,
                -1502.239, -638.9445, 0,
                -1473.891, -626.6362, 313.7819,
                -1389.936, -590.1844, 615.5052,
                -1253.601, -530.9898, 893.5751,
                -1070.125, -451.3273, 1137.305,
                -846.5578, -354.2583, 1337.33,
                -591.4924, -243.513, 1485.961,
                -314.7304, -123.3474, 1577.488,
                -26.90743, 1.62066, 1608.393,
                -26.90743, 1.62066, -1608.393,
                -284.8199, -177.0976, -1577.488,
                -532.8209, -348.9479, -1485.961,
                -761.3799, -507.326, -1337.33,
                -961.7136, -646.1456, -1137.305,
                -1126.123, -760.0719, -893.5751,
                -1248.291, -844.7267, -615.5052,
                -1323.521, -896.8569, -313.7819,
                -1348.923, -914.4592, 0,
                -1323.521, -896.8569, 313.7819,
                -1248.291, -844.7267, 615.5052,
                -1126.123, -760.0719, 893.5751,
                -961.7136, -646.1456, 1137.305,
                -761.3799, -507.326, 1337.33,
                -532.8209, -348.9479, 1485.961,
                -284.8199, -177.0976, 1577.488,
                -26.90743, 1.62066, 1608.393,
                -26.90743, 1.62066, -1608.393,
                -244.9979, -223.9798, -1577.488,
                -454.7073, -440.9106, -1485.961,
                -647.9766, -640.8352, -1337.33,
                -817.3786, -816.0706, -1137.305,
                -956.4032, -959.8825, -893.5751,
                -1059.708, -1066.744, -615.5052,
                -1123.322, -1132.55, -313.7819,
                -1144.802, -1154.769, 0,
                -1123.322, -1132.55, 313.7819,
                -1059.708, -1066.744, 615.5052,
                -956.4032, -959.8825, 893.5751,
                -817.3786, -816.0706, 1137.305,
                -647.9766, -640.8352, 1337.33,
                -454.7073, -440.9106, 1485.961,
                -244.9979, -223.9798, 1577.488,
                -26.90743, 1.62066, 1608.393,
                -26.90743, 1.62066, -1608.393,
                -196.7949, -262.1924, -1577.488,
                -360.1537, -515.8672, -1485.961,
                -510.7061, -749.6552, -1337.33,
                -642.6663, -954.5721, -1137.305,
                -750.9633, -1122.743, -893.5751,
                -831.4351, -1247.705, -615.5052,
                -880.9895, -1324.657, -313.7819,
                -897.7219, -1350.64, 0,
                -880.9895, -1324.657, 313.7819,
                -831.4351, -1247.705, 615.5052,
                -750.9633, -1122.743, 893.5751,
                -642.6663, -954.5721, 1137.305,
                -510.7061, -749.6552, 1337.33,
                -360.1537, -515.8672, 1485.961,
                -196.7949, -262.1924, 1577.488,
                -26.90743, 1.62066, 1608.393,
                -26.90743, 1.62066, -1608.393,
                -142.0632, -290.2667, -1577.488,
                -252.7936, -570.9369, -1485.961,
                -354.8434, -829.6041, -1337.33,
                -444.2907, -1056.328, -1137.305,
                -517.6982, -1242.395, -893.5751,
                -572.2449, -1380.656, -615.5052,
                -605.8347, -1465.796, -313.7819,
                -617.1765, -1494.544, 0,
                -605.8347, -1465.796, 313.7819,
                -572.2449, -1380.656, 615.5052,
                -517.6982, -1242.395, 893.5751,
                -444.2907, -1056.328, 1137.305,
                -354.8434, -829.6041, 1337.33,
                -252.7936, -570.9369, 1485.961,
                -142.0632, -290.2667, 1577.488,
                -26.90743, 1.62066, 1608.393,
                -26.90743, 1.62066, -1608.393,
                -82.90614, -307.1239, -1577.488,
                -136.7528, -604.0036, -1485.961,
                -186.3783, -877.6094, -1337.33,
                -229.8753, -1117.427, -1137.305,
                -265.5724, -1314.24, -893.5751,
                -292.0977, -1460.486, -615.5052,
                -308.4319, -1550.543, -313.7819,
                -313.9473, -1580.952, 0,
                -308.4319, -1550.543, 313.7819,
                -292.0977, -1460.486, 615.5052,
                -265.5724, -1314.24, 893.5751,
                -229.8753, -1117.427, 1137.305,
                -186.3783, -877.6094, 1337.33,
                -136.7528, -604.0036, 1485.961,
                -82.90614, -307.1239, 1577.488,
                -26.90743, 1.62066, 1608.393,
                -26.90743, 1.62066, -1608.393,
                -21.59706, -312.1163, -1577.488,
                -16.49076, -613.7964, -1485.961,
                -11.78477, -891.8265, -1337.33,
                -7.659939, -1135.522, -1137.305,
                -4.274775, -1335.518, -893.5751,
                -1.75937, -1484.128, -615.5052,
                -0.210392, -1575.641, -313.7819,
                0.312634, -1606.542, 0,
                -0.210392, -1575.641, 313.7819,
                -1.75937, -1484.128, 615.5052,
                -4.274775, -1335.518, 893.5751,
                -7.659939, -1135.522, 1137.305,
                -11.78477, -891.8265, 1337.33,
                -16.49076, -613.7964, 1485.961,
                -21.59706, -312.1163, 1577.488,
                -26.90743, 1.62066, 1608.393,
                -26.90743, 1.62066, -1608.393,
                39.50794, -305.0519, -1577.488,
                103.371, -599.9392, -1485.961,
                162.2275, -871.7089, -1337.33,
                213.8157, -1109.917, -1137.305,
                256.1531, -1305.409, -893.5751,
                287.6125, -1450.673, -615.5052,
                306.9852, -1540.126, -313.7819,
                313.5265, -1570.331, 0,
                306.9852, -1540.126, 313.7819,
                287.6125, -1450.673, 615.5052,
                256.1531, -1305.409, 893.5751,
                213.8157, -1109.917, 1137.305,
                162.2275, -871.7089, 1337.33,
                103.371, -599.9392, 1485.961,
                39.50794, -305.0519, 1577.488,
                -26.90743, 1.62066, 1608.393,
                -26.90743, 1.62066, -1608.393,
                98.06063, -286.2023, -1577.488,
                218.2262, -562.9644, -1485.961,
                328.9715, -818.0297, -1337.33,
                426.0406, -1041.596, -1137.305,
                505.703, -1225.073, -893.5751,
                564.8976, -1361.408, -615.5052,
                601.3495, -1445.363, -313.7819,
                613.6577, -1473.711, 0,
                601.3495, -1445.363, 313.7819,
                564.8976, -1361.408, 615.5052,
                505.703, -1225.073, 893.5751,
                426.0406, -1041.596, 1137.305,
                328.9715, -818.0297, 1337.33,
                218.2262, -562.9644, 1485.961,
                98.06063, -286.2023, 1577.488,
                -26.90743, 1.62066, 1608.393,
                -26.90743, 1.62066, -1608.393,
                151.8109, -256.2918, -1577.488,
                323.6611, -504.2928, -1485.961,
                482.0392, -732.8518, -1337.33,
                620.8588, -933.1855, -1137.305,
                734.7851, -1097.595, -893.5751,
                819.4399, -1219.762, -615.5052,
                871.5702, -1294.993, -313.7819,
                889.1724, -1320.395, 0,
                871.5702, -1294.993, 313.7819,
                819.4399, -1219.762, 615.5052,
                734.7851, -1097.595, 893.5751,
                620.8588, -933.1855, 1137.305,
                482.0392, -732.8518, 1337.33,
                323.6611, -504.2928, 1485.961,
                151.8109, -256.2918, 1577.488,
                -26.90743, 1.62066, 1608.393,
                -26.90743, 1.62066, -1608.393,
                198.6931, -216.4698, -1577.488,
                415.6239, -426.1793, -1485.961,
                615.5485, -619.4485, -1337.33,
                790.7838, -788.8505, -1137.305,
                934.5958, -927.8751, -893.5751,
                1041.458, -1031.18, -615.5052,
                1107.263, -1094.794, -313.7819,
                1129.483, -1116.274, 0,
                1107.263, -1094.794, 313.7819,
                1041.458, -1031.18, 615.5052,
                934.5958, -927.8751, 893.5751,
                790.7838, -788.8505, 1137.305,
                615.5485, -619.4485, 1337.33,
                415.6239, -426.1793, 1485.961,
                198.6931, -216.4698, 1577.488,
                -26.90743, 1.62066, 1608.393,
                -26.90743, 1.62066, -1608.393,
                236.9056, -168.2668, -1577.488,
                490.5804, -331.6256, -1485.961,
                724.3684, -482.1779, -1337.33,
                929.2854, -614.1382, -1137.305,
                1097.456, -722.4351, -893.5751,
                1222.419, -802.907, -615.5052,
                1299.37, -852.4614, -313.7819,
                1325.353, -869.1938, 0,
                1299.37, -852.4614, 313.7819,
                1222.419, -802.907, 615.5052,
                1097.456, -722.4351, 893.5751,
                929.2854, -614.1382, 1137.305,
                724.3684, -482.1779, 1337.33,
                490.5804, -331.6256, 1485.961,
                236.9056, -168.2668, 1577.488,
                -26.90743, 1.62066, 1608.393,
                264.9799, -113.5351, -1577.488,
                545.6501, -224.2655, -1485.961,
                804.3173, -326.3152, -1337.33,
                1031.041, -415.7626, -1137.305,
                1217.108, -489.1701, -893.5751,
                1355.369, -543.7169, -615.5052,
                1440.509, -577.3065, -313.7819,
                1469.258, -588.6484, 0,
                1440.509, -577.3065, 313.7819,
                1355.369, -543.7169, 615.5052,
                1217.108, -489.1701, 893.5751,
                1031.041, -415.7626, 1137.305,
                804.3173, -326.3152, 1337.33,
                545.6501, -224.2655, 1485.961,
                264.9799, -113.5351, 1577.488,
                -26.90743, 1.62066, 1608.393
            };

            tm.FaceIndices = new int[]
            {
                17, 1, 0,
                18, 2, 1,
                19, 3, 2,
                20, 4, 19,
                21, 5, 4,
                22, 6, 21,
                23, 7, 22,
                24, 8, 23,
                25, 9, 8,
                26, 10, 9,
                27, 11, 10,
                28, 12, 27,
                29, 13, 12,
                30, 14, 29,
                31, 15, 30,
                32, 15, 31,
                34, 17, 16,
                35, 18, 34,
                36, 19, 35,
                37, 20, 19,
                38, 21, 20,
                39, 22, 38,
                40, 23, 39,
                41, 24, 40,
                42, 25, 24,
                43, 26, 25,
                44, 27, 26,
                45, 28, 44,
                46, 29, 45,
                47, 30, 29,
                48, 31, 30,
                49, 31, 48,
                51, 34, 33,
                52, 35, 34,
                53, 36, 35,
                54, 37, 53,
                55, 38, 37,
                56, 39, 38,
                57, 40, 39,
                58, 41, 57,
                59, 42, 41,
                60, 43, 59,
                61, 44, 60,
                62, 45, 61,
                63, 46, 45,
                64, 47, 63,
                65, 48, 64,
                66, 48, 65,
                68, 51, 50,
                69, 52, 51,
                70, 53, 52,
                71, 54, 53,
                72, 55, 71,
                73, 56, 72,
                74, 57, 73,
                75, 58, 74,
                76, 59, 58,
                77, 60, 59,
                78, 61, 60,
                79, 62, 61,
                80, 63, 79,
                81, 64, 80,
                82, 65, 81,
                83, 65, 82,
                85, 68, 67,
                86, 69, 85,
                87, 70, 86,
                88, 71, 87,
                89, 72, 71,
                90, 73, 89,
                91, 74, 90,
                92, 75, 91,
                93, 76, 75,
                94, 77, 76,
                95, 78, 77,
                96, 79, 95,
                97, 80, 79,
                98, 81, 80,
                99, 82, 81,
                100, 82, 99,
                102, 85, 84,
                103, 86, 85,
                104, 87, 86,
                105, 88, 104,
                106, 89, 88,
                107, 90, 89,
                108, 91, 107,
                109, 92, 108,
                110, 93, 92,
                111, 94, 93,
                112, 95, 111,
                113, 96, 112,
                114, 97, 96,
                115, 98, 114,
                116, 99, 115,
                117, 99, 116,
                119, 102, 101,
                120, 103, 102,
                121, 104, 103,
                122, 105, 121,
                123, 106, 122,
                124, 107, 106,
                125, 108, 124,
                126, 109, 108,
                127, 110, 126,
                128, 111, 110,
                129, 112, 128,
                130, 113, 112,
                131, 114, 113,
                132, 115, 131,
                133, 116, 132,
                134, 116, 133,
                136, 119, 118,
                137, 120, 136,
                138, 121, 137,
                139, 122, 121,
                140, 123, 122,
                141, 124, 123,
                142, 125, 124,
                143, 126, 125,
                144, 127, 143,
                145, 128, 144,
                146, 129, 145,
                147, 130, 146,
                148, 131, 147,
                149, 132, 131,
                150, 133, 132,
                151, 133, 150,
                153, 136, 135,
                154, 137, 136,
                155, 138, 137,
                156, 139, 138,
                157, 140, 156,
                158, 141, 157,
                159, 142, 158,
                160, 143, 159,
                161, 144, 143,
                162, 145, 144,
                163, 146, 145,
                164, 147, 146,
                165, 148, 164,
                166, 149, 165,
                167, 150, 166,
                168, 150, 167,
                170, 153, 152,
                171, 154, 170,
                172, 155, 171,
                173, 156, 155,
                174, 157, 156,
                175, 158, 157,
                176, 159, 158,
                177, 160, 176,
                178, 161, 160,
                179, 162, 178,
                180, 163, 179,
                181, 164, 180,
                182, 165, 181,
                183, 166, 165,
                184, 167, 166,
                185, 167, 184,
                187, 170, 169,
                188, 171, 187,
                189, 172, 188,
                190, 173, 189,
                191, 174, 190,
                192, 175, 174,
                193, 176, 192,
                194, 177, 193,
                195, 178, 177,
                196, 179, 178,
                197, 180, 196,
                198, 181, 180,
                199, 182, 181,
                200, 183, 182,
                201, 184, 183,
                202, 184, 201,
                204, 187, 186,
                205, 188, 187,
                206, 189, 188,
                207, 190, 189,
                208, 191, 190,
                209, 192, 191,
                210, 193, 209,
                211, 194, 210,
                212, 195, 194,
                213, 196, 195,
                214, 197, 213,
                215, 198, 214,
                216, 199, 215,
                217, 200, 216,
                218, 201, 217,
                219, 201, 218,
                221, 204, 203,
                222, 205, 204,
                223, 206, 222,
                224, 207, 223,
                225, 208, 224,
                226, 209, 225,
                227, 210, 226,
                228, 211, 227,
                229, 212, 211,
                230, 213, 212,
                231, 214, 213,
                232, 215, 214,
                233, 216, 215,
                234, 217, 216,
                235, 218, 234,
                236, 218, 235,
                238, 221, 220,
                239, 222, 221,
                240, 223, 222,
                241, 224, 223,
                242, 225, 224,
                243, 226, 242,
                244, 227, 226,
                245, 228, 227,
                246, 229, 245,
                247, 230, 246,
                248, 231, 230,
                249, 232, 248,
                250, 233, 249,
                251, 234, 250,
                252, 235, 251,
                253, 235, 252,
                255, 238, 237,
                256, 239, 255,
                257, 240, 239,
                258, 241, 240,
                259, 242, 241,
                260, 243, 259,
                261, 244, 243,
                262, 245, 244,
                263, 246, 262,
                264, 247, 263,
                265, 248, 247,
                266, 249, 265,
                267, 250, 266,
                268, 251, 267,
                269, 252, 251,
                270, 252, 269,
                272, 255, 254,
                273, 256, 255,
                274, 257, 273,
                275, 258, 274,
                276, 259, 275,
                277, 260, 276,
                278, 261, 277,
                279, 262, 261,
                280, 263, 279,
                281, 264, 263,
                282, 265, 264,
                283, 266, 265,
                284, 267, 266,
                285, 268, 267,
                286, 269, 285,
                287, 269, 286,
                289, 272, 271,
                290, 273, 289,
                291, 274, 290,
                292, 275, 274,
                293, 276, 275,
                294, 277, 276,
                295, 278, 277,
                296, 279, 278,
                297, 280, 296,
                298, 281, 297,
                299, 282, 298,
                300, 283, 299,
                301, 284, 300,
                302, 285, 284,
                303, 286, 285,
                304, 286, 303,
                306, 289, 288,
                307, 290, 289,
                308, 291, 290,
                309, 292, 291,
                310, 293, 292,
                311, 294, 293,
                312, 295, 311,
                313, 296, 295,
                314, 297, 313,
                315, 298, 297,
                316, 299, 315,
                317, 300, 316,
                318, 301, 317,
                319, 302, 318,
                320, 303, 319,
                321, 303, 320,
                323, 306, 305,
                324, 307, 323,
                325, 308, 324,
                326, 309, 325,
                327, 310, 309,
                328, 311, 327,
                329, 312, 328,
                330, 313, 312,
                331, 314, 330,
                332, 315, 314,
                333, 316, 315,
                334, 317, 333,
                335, 318, 317,
                336, 319, 318,
                337, 320, 319,
                338, 320, 337,
                340, 323, 322,
                341, 324, 340,
                342, 325, 324,
                343, 326, 342,
                344, 327, 326,
                345, 328, 327,
                346, 329, 345,
                347, 330, 329,
                348, 331, 347,
                349, 332, 331,
                350, 333, 349,
                351, 334, 350,
                352, 335, 334,
                353, 336, 352,
                354, 337, 336,
                355, 337, 354,
                357, 340, 339,
                358, 341, 340,
                359, 342, 341,
                360, 343, 342,
                361, 344, 360,
                362, 345, 361,
                363, 346, 362,
                364, 347, 346,
                365, 348, 364,
                366, 349, 348,
                367, 350, 349,
                368, 351, 350,
                369, 352, 368,
                370, 353, 369,
                371, 354, 370,
                372, 354, 371,
                374, 357, 356,
                375, 358, 357,
                376, 359, 358,
                377, 360, 359,
                378, 361, 377,
                379, 362, 361,
                380, 363, 379,
                381, 364, 363,
                382, 365, 381,
                383, 366, 365,
                384, 367, 383,
                385, 368, 367,
                386, 369, 385,
                387, 370, 386,
                388, 371, 387,
                389, 371, 388,
                391, 374, 373,
                392, 375, 391,
                393, 376, 392,
                394, 377, 393,
                395, 378, 394,
                396, 379, 395,
                397, 380, 396,
                398, 381, 380,
                399, 382, 398,
                400, 383, 382,
                401, 384, 383,
                402, 385, 384,
                403, 386, 385,
                404, 387, 386,
                405, 388, 387,
                406, 388, 405,
                408, 391, 390,
                409, 392, 391,
                410, 393, 392,
                411, 394, 410,
                412, 395, 394,
                413, 396, 395,
                414, 397, 396,
                415, 398, 414,
                416, 399, 398,
                417, 400, 416,
                418, 401, 417,
                419, 402, 418,
                420, 403, 402,
                421, 404, 420,
                422, 405, 421,
                423, 405, 422,
                425, 408, 407,
                426, 409, 425,
                427, 410, 426,
                428, 411, 427,
                429, 412, 428,
                430, 413, 429,
                431, 414, 430,
                432, 415, 431,
                433, 416, 415,
                434, 417, 416,
                435, 418, 417,
                436, 419, 418,
                437, 420, 419,
                438, 421, 420,
                439, 422, 421,
                440, 422, 439,
                442, 425, 424,
                443, 426, 425,
                444, 427, 426,
                445, 428, 427,
                446, 429, 445,
                447, 430, 429,
                448, 431, 447,
                449, 432, 431,
                450, 433, 449,
                451, 434, 433,
                452, 435, 451,
                453, 436, 435,
                454, 437, 453,
                455, 438, 454,
                456, 439, 455,
                457, 439, 456,
                459, 442, 441,
                460, 443, 442,
                461, 444, 460,
                462, 445, 461,
                463, 446, 445,
                464, 447, 463,
                465, 448, 464,
                466, 449, 448,
                467, 450, 466,
                468, 451, 450,
                469, 452, 451,
                470, 453, 469,
                471, 454, 453,
                472, 455, 454,
                473, 456, 472,
                474, 456, 473,
                476, 459, 458,
                477, 460, 476,
                478, 461, 477,
                479, 462, 478,
                480, 463, 462,
                481, 464, 463,
                482, 465, 481,
                483, 466, 465,
                484, 467, 483,
                485, 468, 467,
                486, 469, 485,
                487, 470, 486,
                488, 471, 470,
                489, 472, 471,
                490, 473, 472,
                491, 473, 490,
                493, 476, 475,
                494, 477, 476,
                495, 478, 477,
                496, 479, 495,
                497, 480, 496,
                498, 481, 497,
                499, 482, 498,
                500, 483, 482,
                501, 484, 500,
                502, 485, 484,
                503, 486, 485,
                504, 487, 486,
                505, 488, 487,
                506, 489, 505,
                507, 490, 506,
                508, 490, 507,
                510, 493, 492,
                511, 494, 493,
                512, 495, 511,
                513, 496, 495,
                514, 497, 513,
                515, 498, 497,
                516, 499, 515,
                517, 500, 499,
                518, 501, 517,
                519, 502, 501,
                520, 503, 519,
                521, 504, 503,
                522, 505, 521,
                523, 506, 505,
                524, 507, 523,
                525, 507, 524,
                527, 510, 509,
                528, 511, 510,
                529, 512, 511,
                530, 513, 512,
                531, 514, 530,
                532, 515, 514,
                533, 516, 532,
                534, 517, 516,
                535, 518, 534,
                536, 519, 518,
                537, 520, 536,
                538, 521, 520,
                539, 522, 538,
                540, 523, 539,
                541, 524, 540,
                542, 524, 541,
                543, 527, 526,
                544, 528, 543,
                545, 529, 544,
                546, 530, 545,
                547, 531, 530,
                548, 532, 531,
                549, 533, 548,
                550, 534, 533,
                551, 535, 550,
                552, 536, 535,
                553, 537, 552,
                554, 538, 553,
                555, 539, 538,
                556, 540, 539,
                557, 541, 540,
                558, 541, 557,
                18, 1, 17,
                19, 2, 18,
                4, 3, 19,
                21, 4, 20,
                6, 5, 21,
                7, 6, 22,
                8, 7, 23,
                25, 8, 24,
                26, 9, 25,
                27, 10, 26,
                12, 11, 27,
                29, 12, 28,
                14, 13, 29,
                15, 14, 30,
                18, 17, 34,
                19, 18, 35,
                37, 19, 36,
                38, 20, 37,
                22, 21, 38,
                23, 22, 39,
                24, 23, 40,
                42, 24, 41,
                43, 25, 42,
                44, 26, 43,
                28, 27, 44,
                29, 28, 45,
                47, 29, 46,
                48, 30, 47,
                52, 34, 51,
                53, 35, 52,
                37, 36, 53,
                55, 37, 54,
                56, 38, 55,
                57, 39, 56,
                41, 40, 57,
                59, 41, 58,
                43, 42, 59,
                44, 43, 60,
                45, 44, 61,
                63, 45, 62,
                47, 46, 63,
                48, 47, 64,
                69, 51, 68,
                70, 52, 69,
                71, 53, 70,
                55, 54, 71,
                56, 55, 72,
                57, 56, 73,
                58, 57, 74,
                76, 58, 75,
                77, 59, 76,
                78, 60, 77,
                79, 61, 78,
                63, 62, 79,
                64, 63, 80,
                65, 64, 81,
                69, 68, 85,
                70, 69, 86,
                71, 70, 87,
                89, 71, 88,
                73, 72, 89,
                74, 73, 90,
                75, 74, 91,
                93, 75, 92,
                94, 76, 93,
                95, 77, 94,
                79, 78, 95,
                97, 79, 96,
                98, 80, 97,
                99, 81, 98,
                103, 85, 102,
                104, 86, 103,
                88, 87, 104,
                106, 88, 105,
                107, 89, 106,
                91, 90, 107,
                92, 91, 108,
                110, 92, 109,
                111, 93, 110,
                95, 94, 111,
                96, 95, 112,
                114, 96, 113,
                98, 97, 114,
                99, 98, 115,
                120, 102, 119,
                121, 103, 120,
                105, 104, 121,
                106, 105, 122,
                124, 106, 123,
                108, 107, 124,
                126, 108, 125,
                110, 109, 126,
                128, 110, 127,
                112, 111, 128,
                130, 112, 129,
                131, 113, 130,
                115, 114, 131,
                116, 115, 132,
                120, 119, 136,
                121, 120, 137,
                139, 121, 138,
                140, 122, 139,
                141, 123, 140,
                142, 124, 141,
                143, 125, 142,
                127, 126, 143,
                128, 127, 144,
                129, 128, 145,
                130, 129, 146,
                131, 130, 147,
                149, 131, 148,
                150, 132, 149,
                154, 136, 153,
                155, 137, 154,
                156, 138, 155,
                140, 139, 156,
                141, 140, 157,
                142, 141, 158,
                143, 142, 159,
                161, 143, 160,
                162, 144, 161,
                163, 145, 162,
                164, 146, 163,
                148, 147, 164,
                149, 148, 165,
                150, 149, 166,
                154, 153, 170,
                155, 154, 171,
                173, 155, 172,
                174, 156, 173,
                175, 157, 174,
                176, 158, 175,
                160, 159, 176,
                178, 160, 177,
                162, 161, 178,
                163, 162, 179,
                164, 163, 180,
                165, 164, 181,
                183, 165, 182,
                184, 166, 183,
                171, 170, 187,
                172, 171, 188,
                173, 172, 189,
                174, 173, 190,
                192, 174, 191,
                176, 175, 192,
                177, 176, 193,
                195, 177, 194,
                196, 178, 195,
                180, 179, 196,
                198, 180, 197,
                199, 181, 198,
                200, 182, 199,
                201, 183, 200,
                205, 187, 204,
                206, 188, 205,
                207, 189, 206,
                208, 190, 207,
                209, 191, 208,
                193, 192, 209,
                194, 193, 210,
                212, 194, 211,
                213, 195, 212,
                197, 196, 213,
                198, 197, 214,
                199, 198, 215,
                200, 199, 216,
                201, 200, 217,
                222, 204, 221,
                206, 205, 222,
                207, 206, 223,
                208, 207, 224,
                209, 208, 225,
                210, 209, 226,
                211, 210, 227,
                229, 211, 228,
                230, 212, 229,
                231, 213, 230,
                232, 214, 231,
                233, 215, 232,
                234, 216, 233,
                218, 217, 234,
                239, 221, 238,
                240, 222, 239,
                241, 223, 240,
                242, 224, 241,
                226, 225, 242,
                244, 226, 243,
                245, 227, 244,
                229, 228, 245,
                230, 229, 246,
                248, 230, 247,
                232, 231, 248,
                233, 232, 249,
                234, 233, 250,
                235, 234, 251,
                239, 238, 255,
                257, 239, 256,
                258, 240, 257,
                259, 241, 258,
                243, 242, 259,
                261, 243, 260,
                262, 244, 261,
                246, 245, 262,
                247, 246, 263,
                265, 247, 264,
                249, 248, 265,
                250, 249, 266,
                251, 250, 267,
                269, 251, 268,
                273, 255, 272,
                257, 256, 273,
                258, 257, 274,
                259, 258, 275,
                260, 259, 276,
                261, 260, 277,
                279, 261, 278,
                263, 262, 279,
                281, 263, 280,
                282, 264, 281,
                283, 265, 282,
                284, 266, 283,
                285, 267, 284,
                269, 268, 285,
                273, 272, 289,
                274, 273, 290,
                292, 274, 291,
                293, 275, 292,
                294, 276, 293,
                295, 277, 294,
                296, 278, 295,
                280, 279, 296,
                281, 280, 297,
                282, 281, 298,
                283, 282, 299,
                284, 283, 300,
                302, 284, 301,
                303, 285, 302,
                307, 289, 306,
                308, 290, 307,
                309, 291, 308,
                310, 292, 309,
                311, 293, 310,
                295, 294, 311,
                313, 295, 312,
                297, 296, 313,
                315, 297, 314,
                299, 298, 315,
                300, 299, 316,
                301, 300, 317,
                302, 301, 318,
                303, 302, 319,
                307, 306, 323,
                308, 307, 324,
                309, 308, 325,
                327, 309, 326,
                311, 310, 327,
                312, 311, 328,
                330, 312, 329,
                314, 313, 330,
                332, 314, 331,
                333, 315, 332,
                317, 316, 333,
                335, 317, 334,
                336, 318, 335,
                337, 319, 336,
                324, 323, 340,
                342, 324, 341,
                326, 325, 342,
                344, 326, 343,
                345, 327, 344,
                329, 328, 345,
                347, 329, 346,
                331, 330, 347,
                349, 331, 348,
                333, 332, 349,
                334, 333, 350,
                352, 334, 351,
                336, 335, 352,
                354, 336, 353,
                358, 340, 357,
                359, 341, 358,
                360, 342, 359,
                344, 343, 360,
                345, 344, 361,
                346, 345, 362,
                364, 346, 363,
                348, 347, 364,
                366, 348, 365,
                367, 349, 366,
                368, 350, 367,
                352, 351, 368,
                353, 352, 369,
                354, 353, 370,
                375, 357, 374,
                376, 358, 375,
                377, 359, 376,
                361, 360, 377,
                379, 361, 378,
                363, 362, 379,
                381, 363, 380,
                365, 364, 381,
                383, 365, 382,
                367, 366, 383,
                385, 367, 384,
                369, 368, 385,
                370, 369, 386,
                371, 370, 387,
                375, 374, 391,
                376, 375, 392,
                377, 376, 393,
                378, 377, 394,
                379, 378, 395,
                380, 379, 396,
                398, 380, 397,
                382, 381, 398,
                400, 382, 399,
                401, 383, 400,
                402, 384, 401,
                403, 385, 402,
                404, 386, 403,
                405, 387, 404,
                409, 391, 408,
                410, 392, 409,
                394, 393, 410,
                412, 394, 411,
                413, 395, 412,
                414, 396, 413,
                398, 397, 414,
                416, 398, 415,
                400, 399, 416,
                401, 400, 417,
                402, 401, 418,
                420, 402, 419,
                404, 403, 420,
                405, 404, 421,
                409, 408, 425,
                410, 409, 426,
                411, 410, 427,
                412, 411, 428,
                413, 412, 429,
                414, 413, 430,
                415, 414, 431,
                433, 415, 432,
                434, 416, 433,
                435, 417, 434,
                436, 418, 435,
                437, 419, 436,
                438, 420, 437,
                439, 421, 438,
                443, 425, 442,
                444, 426, 443,
                445, 427, 444,
                429, 428, 445,
                447, 429, 446,
                431, 430, 447,
                449, 431, 448,
                433, 432, 449,
                451, 433, 450,
                435, 434, 451,
                453, 435, 452,
                437, 436, 453,
                438, 437, 454,
                439, 438, 455,
                460, 442, 459,
                444, 443, 460,
                445, 444, 461,
                463, 445, 462,
                447, 446, 463,
                448, 447, 464,
                466, 448, 465,
                450, 449, 466,
                468, 450, 467,
                469, 451, 468,
                453, 452, 469,
                471, 453, 470,
                472, 454, 471,
                456, 455, 472,
                460, 459, 476,
                461, 460, 477,
                462, 461, 478,
                480, 462, 479,
                481, 463, 480,
                465, 464, 481,
                483, 465, 482,
                467, 466, 483,
                485, 467, 484,
                469, 468, 485,
                470, 469, 486,
                488, 470, 487,
                489, 471, 488,
                490, 472, 489,
                494, 476, 493,
                495, 477, 494,
                479, 478, 495,
                480, 479, 496,
                481, 480, 497,
                482, 481, 498,
                500, 482, 499,
                484, 483, 500,
                502, 484, 501,
                503, 485, 502,
                504, 486, 503,
                505, 487, 504,
                489, 488, 505,
                490, 489, 506,
                511, 493, 510,
                495, 494, 511,
                513, 495, 512,
                497, 496, 513,
                515, 497, 514,
                499, 498, 515,
                517, 499, 516,
                501, 500, 517,
                519, 501, 518,
                503, 502, 519,
                521, 503, 520,
                505, 504, 521,
                523, 505, 522,
                507, 506, 523,
                528, 510, 527,
                529, 511, 528,
                530, 512, 529,
                514, 513, 530,
                532, 514, 531,
                516, 515, 532,
                534, 516, 533,
                518, 517, 534,
                536, 518, 535,
                520, 519, 536,
                538, 520, 537,
                522, 521, 538,
                523, 522, 539,
                524, 523, 540,
                528, 527, 543,
                529, 528, 544,
                530, 529, 545,
                547, 530, 546,
                548, 531, 547,
                533, 532, 548,
                550, 533, 549,
                535, 534, 550,
                552, 535, 551,
                537, 536, 552,
                538, 537, 553,
                555, 538, 554,
                556, 539, 555,
                557, 540, 556
            };

            tm.FaceSizes = new int[tm.FaceIndices.Length / 3];
            for (int i = 0; i < tm.FaceSizes.Length; ++i)
            {
                tm.FaceSizes[i] = 3;
            }

            //for (int i = 0; i < tm.Vertices.Length; i += 3)
            //    System.Console.WriteLine(string.Format("{0:0.00} {1:0.00} {2:0.00}", tm.Vertices[i], tm.Vertices[i + 1], tm.Vertices[i + 2]));


            TetgenSharp.TetgenBehaviour b = new TetgenSharp.TetgenBehaviour();
            b.refine = 0;
            b.quality = 1;
            b.plc = 1;
            //b.maxvolume = 100000;
            //b.mindihedral = 10;
            //b.supsteiner_level = 1;
            b.minratio = 4.0;
            //int N = TetgenSharp.TetgenSharp.Test();

            TetgenSharp.TetgenMesh tm2 = TetgenSharp.TetRhino.Tetrahedralize(tm.Vertices, tm.FaceIndices, tm.FaceSizes, b);

            System.Console.WriteLine("End.");

            System.Console.ReadKey() ;
        }
    }
}
